﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UAgentMacList.aspx.cs" Inherits="IHISCETeim.Web.AgentSys.SvrMgr.UAgentMacList" %>
<form id="pagerForm" method="post" action="SvrMgr/UAgentMacList.aspx">
<input type="hidden" name="IsInto" value="<%=IsInto %>" />
<input type="hidden" name="SerialNumber" value="<%=SerialNumber %>" />
<input type="hidden" name="IntoStockDateFrom" value="<%=IntoStockDateFrom %>" />
<input type="hidden" name="IntoStockDateTo" value="<%=IntoStockDateTo %>" />
<input type="hidden" name="searchAgentName" value="<%=searchAgentName %>" />

<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="<%=numPerPage %>" />
</form>
<form id="form1" runat="server" method="post" action="SvrMgr/UAgentMacList.aspx"
onsubmit="return navTabSearch(this);">
<div class="pageContent">    
    <div class="searchBar">
        
        <table class="searchContent">
            <tr>
             <% if(HasPower(IHISCETeim.Web.Permission.经销商平台_公司人员)) { %>
            
                <td>经销商：</td>
                <td colspan="5">
                    <input name="searchAgentName" type="text" value="<%=searchAgentName %>"  />
                </td>
            
            <%} %>       
                <td>
                    机号:
                </td>
                <td>
                    <input type="text" name="SerialNumber" value="<%=SerialNumber %>" />
                </td>
                <td>
                    入库日期从：
                </td>
                <td >
                   <input name="IntoStockDateFrom" type="text" size=8 value="<%=IntoStockDateFrom %>"  class="date"/>
                </td>
                <td>
                   到：
                </td>
                <td>
                   <input name="IntoStockDateTo" type="text" size=8 value="<%=IntoStockDateTo %>"  class="date"/>
                </td>
                <td>
                    <input type="checkbox" id="UAgentMacStockList_IsInto" name="IsInto" value="True" <%=IsInto?"checked":"" %> />只显示未交机
                </td>
                <td>
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <button type="submit">
                                            检索</button></div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr> 
                                
        </table>
    </div>
    <div class="panelBar">                    
        <ul class="toolBar">                       
            <%if(HasPower(IHISCETeim.Web.Permission.新增)) {%>
                <li><a class="add" href="SvrMgr/UAgentMacNewNGAdd.aspx?Action=add" target="navTab" title="新机入库检查" rel="UAgentMacNewNGAdd" ><span>新机入库检查</span></a></li>
                 <li><a class="add" href="SvrMgr/UAgentMacNewOut.aspx?uasid={sid_user}&Action=add" target="dialog" title="样机转出" rel="UAgentMacNewOut" max="false" mask="true" maxable="false" minable="false" resizable="false" drawable="true" width="450" height="250"><span>样机转出</span></a></li>
            <%} %>
            <% if (HasPower(IHISCETeim.Web.Permission.修改)){%>
                <li><a class="edit" href="SvrMgr/UAgentMacNewNGAdd.aspx?uasid={sid_user}&Action=update" target="navTab" title="查看/修改新机入库检查" rel="UAgentMacNewNGAdd" ><span>查看/修改新机入库检查</span></a></li>
            <%} %>
              
             <%if (HasPower(IHISCETeim.Web.Permission.修改))
               {%>
               <li><a class="add" href="SvrMgr/UAgentMacStockDetailNGList.aspx?uasid={sid_user}" target="dialog" title="样机定期检查管理" rel="UAgentMacStockDetailNGList" max=false  mask=true  maxable=false  minable=false  resizable=true drawable=true  width="800" height="500"><span>样机定期检查管理</span></a></li>
            <%} %>
        </ul>
    </div>
    <asp:repeater id="rpMenu" runat="server">
        <HeaderTemplate>
        <table class="list" width="1200"  layoutH="78">
        <thead>
            <tr  >  
                 <th width="100">
                    代理商
                </th>                  
                <th  orderField="SerialNumber" class="asc" width="85px">
                    机号
                </th>                
              
                <th orderField="IntoStockDate" class="asc" width="110px">
                    入库时间
                </th>
               <%-- <th  align="center" width="90px">
                    是否已交机
                </th>
                 <th width="110px">
                    交机时间
                </th>--%>
               <th width="85px">是否转出</th>
                <th width="85px">转出时间</th>
                <th align="center" width="65px">
                    需点检次数
                </th>
                <th align="center" width="65px">
                    已点检次数
                </th>
                 <th align="center" width="65px">
                    未点检次数
                </th>  
                <th width="85px">
                    完成率
                </th> 
                     
            </tr>
        </thead>
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr target="sid_user" rel="<%# Eval("UASID") %>"> 
                  <td style=" text-decoration: <%# Convert.ToBoolean(Eval("State"))?"line-through;":"" %>" >
                    <%# Eval("AgentName")%>
                </td>  
				<td>
                <%# Eval("SerialNumber")%>
                </td>
               
				<td><%# Eval("IntoStockDate").ToString().Replace(" 0:00:00","")%></td>
			
               <%-- <td><%# Convert.ToBoolean(Eval("IsInto"))?"是":"<b style='color:red'>否</b >"%></td>
                <td><%# Eval("IntoDate").ToString().Replace(" 0:00:00","")%></td>
              --%>
                <td><%# Convert.ToBoolean(Eval("State"))?"是":"否"%></td>
                <td>  <%# Eval("outdate")%></td>
                <td>
                    <%# Eval("d1")%>
                </td>
                 <td>
                    <%# Eval("d2")%>
                </td>
                <td>
                    <%# GetNoSingNum(Eval("d1"), Eval("d2"))%>
                </td>
                 <td></td>
              
               
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr> 
				
			
                <td></td>
                <td></td><td></td><td></td><td></td>
                <td>
                <%=GetSumDt("d1")%>
                </td>
                 <td>
                <%=GetSumDt("d2")%>
                </td>
                 <td>
                <%=Convert.ToInt32(GetSumDt("d1")) == 0 ? "0" : (Convert.ToInt32(GetSumDt("d1")) - Convert.ToInt32(GetSumDt("d2"))).ToString()%>
                </td>
                 <td>
                 点检完成率为: <%= Convert.ToDouble(GetSumDt("d1"))==0?"100":(Convert.ToDouble(Convert.ToDouble(GetSumDt("d2")) / Convert.ToDouble(GetSumDt("d1"))) * 100).ToString("F2")%>%
                 </td>
                <td></td>
			
             <%--   <td></td>--%>
			</tr>
        </tbody>
    </table>
    </FooterTemplate> 
    </asp:repeater>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <%=SetnumPerPage() %>
            </select>
            <span>条，共<%=TotalCount%>条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="<%=TotalCount%>" numperpage="<%=numPerPage %>"
            pagenumshown="10" currentpage="<%=pageNum %>">
        </div>
    </div>
</div>
</form>